Move version and release tag to configure.in (don't forget autoconf after change!).
authoroliskoli <oliskoli>
Wed, 26 Jul 2006 19:23:50 +0000 (19:23 +0000)
committeroliskoli <oliskoli>
Wed, 26 Jul 2006 19:23:50 +0000 (19:23 +0000)
Add version information to winbuild (MinGW).

Makefile.in
config.h.in
configure
configure.in

index c8542d6d6f5429395cf68576cfa0b6fb7c3c38fa..1438048bb696621788c9fb4d625ed549e4704026 100644 (file)
@@ -1,18 +1,23 @@
 VPATH = @srcdir@
 
-VERSU=1_3_0
-VERSD=1.3.0
-# YYYYMMDD, please, if beta.
-# RELEASE=-beta20060701a
-VERSIONU=$(VERSU)$(RELEASE)
+# version and release are defined in the head of configure.in 
+# don't forget 'autoconf' if you change them 
+VERSD=@GBMAJOR@.@GBMINOR@.@GBMICRO@
+VERSU=@GBMAJOR@_@GBMINOR@_@GBMICRO@
+RELEASE=@PACKAGE_RELEASE@
+
 VERSIOND=$(VERSD)$(RELEASE)
+VERSIONU=$(VERSU)$(RELEASE)
 
 DOCVERSION=development
-DOCVERSION=1.3.0
+DOCVERSION=@PACKAGE_VERSION@
 
 CC=@CC@
 EXEEXT=@EXEEXT@
 
+# Resource compiler, currently used under MinGW
+RC=@RC@
+
 #EXTRA_LIBS -lefence
 
 # Space is significant, because MSVC wants no space between switch and arg (-Fofoo.o)
@@ -80,7 +85,7 @@ LIBOBJS = queue.o route.o waypt.o filter_vecs.o util.o vecs.o mkshort.o \
          inifile.o garmin_fs.o gbsleep.o units.o textfile.o @GBSER@ gbser.o \
          gbfile.o \
        $(COLDSYNC) $(GARMIN) $(JEEPS) $(SHAPE) $(ZLIB) $(FMTS) $(FILTERS)
-OBJS = main.o globals.o $(LIBOBJS)
+OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@
 
 .c.o:
        $(CC)  @CPPFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
@@ -105,6 +110,9 @@ globals.o:
 jeeps/gpslibusb.o: 
        $(CC)  @CPPFLAGS@ -c $(GBCFLAGS) @USB_CFLAGS@ @srcdir@/jeeps/gpslibusb.c $(OUTPUT_SWITCH)$@
 
+fileinfo.o: win32/gpsbabel.rc
+       $(RC) -o fileinfo.o win32/gpsbabel.rc
+
 clean:
        rm -f $(OBJS) gpsbabel gpsbabel.exe
 
index 29441673cc5bd93db99bdb4a71291d3966031f91..5923858d6047311e2119767d205fb8012e16d241 100644 (file)
@@ -30,6 +30,9 @@
 /* Define to the full name of this package. */
 #undef PACKAGE_NAME
 
+/* Define to the release of this package. */
+#undef PACKAGE_RELEASE
+
 /* Define to the full name and version of this package. */
 #undef PACKAGE_STRING
 
index afa798362fd0cf9544507649f71caec816f0c23f..2f42ef36b8e0e6d4d0faf3d71a1895f6f1eabc3f 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for GPSBabel VERSION.
+# Generated by GNU Autoconf 2.59 for GPSBabel 1.3.0.
 #
 # Report bugs to <BUG-REPORT-ADDRESS>.
 #
@@ -269,11 +269,11 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='GPSBabel'
 PACKAGE_TARNAME='gpsbabel'
-PACKAGE_VERSION='VERSION'
-PACKAGE_STRING='GPSBabel VERSION'
+PACKAGE_VERSION='1.3.0'
+PACKAGE_STRING='GPSBabel 1.3.0'
 PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE  LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS GBSER EXPAT_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PACKAGE_RELEASE GBMAJOR GBMINOR GBMICRO build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE  FILEINFO RC LIBUSBCONFIG USB_LIBS USB_CFLAGS OSJEEPS GBSER EXPAT_LIB LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -738,7 +738,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GPSBabel VERSION to adapt to many kinds of systems.
+\`configure' configures GPSBabel 1.3.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -800,7 +800,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GPSBabel VERSION:";;
+     short | recursive ) echo "Configuration of GPSBabel 1.3.0:";;
    esac
   cat <<\_ACEOF
 
@@ -926,7 +926,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-GPSBabel configure VERSION
+GPSBabel configure 1.3.0
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -940,7 +940,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GPSBabel $as_me VERSION, which was
+It was created by GPSBabel $as_me 1.3.0, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1272,6 +1272,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
+
+
+
+# YYYYMMDD, please, if beta, i.e. "-beta20060413"
+PACKAGE_RELEASE=""
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_RELEASE "$PACKAGE_RELEASE"
+_ACEOF
+
+
+
+GBMAJOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $major)`
+GBMINOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $minor)`
+GBMICRO=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $micro)`
 
 
 
@@ -2624,6 +2641,22 @@ echo "${ECHO_T}no" >&6
     fi
 
 
+case "$target" in
+    *-*-mingw32*)
+       FILEINFO=fileinfo.o
+       if test "$CC" = gcc ; then
+               RC=windres
+       else
+               RC=`echo "$CC" | sed -e 's/gcc$/windres/'`
+       fi
+       ;;
+    *)
+       RC=false
+       ;;
+esac
+
+
+
 case "$target" in
     *-*-cygwin* | *-*-mingw32*)
 
@@ -3054,7 +3087,7 @@ fi
 done
 
 
-          ac_config_files="$ac_config_files Makefile"
+                    ac_config_files="$ac_config_files Makefile win32/gpsbabel.rc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -3418,7 +3451,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by GPSBabel $as_me VERSION, which was
+This file was extended by GPSBabel $as_me 1.3.0, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3478,7 +3511,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-GPSBabel config.status VERSION
+GPSBabel config.status 1.3.0
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -3582,6 +3615,7 @@ do
   case "$ac_config_target" in
   # Handling of arguments.
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "win32/gpsbabel.rc" ) CONFIG_FILES="$CONFIG_FILES win32/gpsbabel.rc" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -3667,6 +3701,10 @@ s,@ECHO_C@,$ECHO_C,;t t
 s,@ECHO_N@,$ECHO_N,;t t
 s,@ECHO_T@,$ECHO_T,;t t
 s,@LIBS@,$LIBS,;t t
+s,@PACKAGE_RELEASE@,$PACKAGE_RELEASE,;t t
+s,@GBMAJOR@,$GBMAJOR,;t t
+s,@GBMINOR@,$GBMINOR,;t t
+s,@GBMICRO@,$GBMICRO,;t t
 s,@build@,$build,;t t
 s,@build_cpu@,$build_cpu,;t t
 s,@build_vendor@,$build_vendor,;t t
@@ -3690,6 +3728,8 @@ s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
 s,@SET_MAKE@,$SET_MAKE,;t t
+s,@FILEINFO@,$FILEINFO,;t t
+s,@RC@,$RC,;t t
 s,@LIBUSBCONFIG@,$LIBUSBCONFIG,;t t
 s,@USB_LIBS@,$USB_LIBS,;t t
 s,@USB_CFLAGS@,$USB_CFLAGS,;t t
index 65adeb687a9c3eedde9f9bf69dc8f101f6175525..a3e047769304730c40c88aa6ce7a207b333aa3b5 100644 (file)
@@ -2,7 +2,21 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(GPSBabel, VERSION, BUG-REPORT-ADDRESS)
+
+AC_INIT(GPSBabel, 1.3.0, BUG-REPORT-ADDRESS)
+
+# YYYYMMDD, please, if beta, i.e. "-beta20060413"
+PACKAGE_RELEASE=""
+AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, "$PACKAGE_RELEASE", [Define to the release name of this package.])
+AC_SUBST(PACKAGE_RELEASE)
+
+GBMAJOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $major)`
+GBMINOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $minor)`
+GBMICRO=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $micro)`
+AC_SUBST(GBMAJOR)
+AC_SUBST(GBMINOR)
+AC_SUBST(GBMICRO)
+
 # AC_CONFIG_SRCDIR([nmea.c])
 AC_CONFIG_HEADER([config.h])
 
@@ -79,6 +93,22 @@ AC_ARG_ENABLE(filters,
     fi
 
 
+case "$target" in
+    *-*-mingw32*)
+       FILEINFO=fileinfo.o
+       if test "$CC" = gcc ; then
+               RC=windres
+       else
+               RC=`echo "$CC" | sed -e 's/gcc$/windres/'`
+       fi
+       ;;
+    *)
+       RC=false
+       ;;
+esac
+AC_SUBST(FILEINFO)
+AC_SUBST(RC)
+
 case "$target" in
     *-*-cygwin* | *-*-mingw32*)